<%@ page language="java" contentType="text/html; charset=utf-8"
	pageEncoding="utf-8" %>
<%@ taglib uri="http://jakarta.apache.org/struts/tags-bean"
	prefix="bean"%>
<%@ taglib uri="http://jakarta.apache.org/struts/tags-html"
	prefix="html"%>
<%@ page import="java.util.*,java.sql.*,com.telecom.cms.util.*,com.telecom.cms.service.*,com.telecom.cms.dto.*,com.telecom.cms.dao.*"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
		<title></title>
		<style type="text/css">
P {
	font-size: 13px;
	height: 13px;
	color: white;
	filter: glow(color =               #ff6600, strength =               2);
}
BODY{
	font-size: 12px;
	color: darkblue;
}
.tablestyle1 tr {
	background-color:expression(((this.sectionRowIndex%2==0)||this.sectionRowIndex<1)?"#e8f4ff":"#ffffff");
	font-size: 12px;
	line-height: 150%;
}
</style>

	</head>
	<body>
	<table align="left"><tr>
	<td valign="top">
	  <table  cellspacing="0" cellpadding="0" border="0">
				<tbody>
					<tr>
						<td width="3" height="31">
							<img height="31" src="./images/table_01.gif" width="3" />
						</td>
						<td background="./images/table_02.gif" height="31">
							<table cellspacing="0" cellpadding="0" width="146" align="left"
								border="0">
								<tbody>
									<tr>
										<td width="51" background="./images/title_1_bg.gif">
											<img height="31" src="./images/title_1.gif" width="51" />
										</td>
										<td width="95" background="./images/title_1_bg.gif">
											<span class="color_b_666">欢迎使用</span>
										</td>
									</tr>
								</tbody>
							</table>
						</td>
						<td width="3">
							<img height="31" src="./images/table_03.gif" width="3" />
						</td>
					</tr>
					<tr>
						<td width="3" background="./images/table_04.gif" width="3"
							align="right">
							<img height="100%" src="./images/table_04.gif" width="3" />
						</td>
						<td>
							<table width='100%' border='0' cellspacing='0' cellpadding='0'>
								<tr>
									<td height='30' background='images/Jrcj_Middle_Line.gif'>
										&nbsp;&nbsp;&nbsp;&nbsp;今天是<% Calendar cal=Calendar.getInstance();
										String weekday="";
										switch (((cal.get(Calendar.DAY_OF_WEEK)+6)%8))
										{
										  case 1:weekday="一";break;
										  case 2:weekday="二";break;
										  case 3:weekday="三";break;
										  case 4:weekday="四";break;
										  case 5:weekday="五";break;
										  case 6:weekday="六";break;
										  case 7:weekday="日";break;
										}
                                           out.print(cal.get(Calendar.YEAR)+"年"+(cal.get(Calendar.MONTH)+1)+"月"+cal.get(Calendar.DAY_OF_MONTH)+"日(星期"+weekday+")");
										%>
									</td>
								</tr>
								<tr>
									<td height='30' background='images/Jrcj_Middle_Line.gif'>
										&nbsp;&nbsp;&nbsp;&nbsp;欢迎使用，<%
										if(request.getSession().getAttribute("User_Inst")!=null)
   									    	out.print(((SysUser)request.getSession().getAttribute("User_Inst")).getNickName());
										%>。
									</td>
								</tr>
							</table>
						</td>
						<td background="./images/table_05.gif" width="3" align="left">
							<img height="100%" src="./images/table_05.gif" width="3">
						</td>
					</tr>
					<tr>
						<td height=3 valign="top">
							<img height="12px" src="./images/table_06.gif" width="3px">
						</td>
						<td height=3 valign="top">
							<img height="3px" src="./images/table_07.gif" width="100%">
						</td>
						<td height=3 valign="top">
							<img height="12px" src="./images/table_08.gif" width="3px">
						</td>
					</tr>
				</tbody>
		</table>
		
		<table  cellspacing="0" cellpadding="0" border="0">
				<tbody>
					<tr>
						<td width="3" height="31">
							<img height="31" src="./images/table_01.gif" width="3" />
						</td>
						<td background="./images/table_02.gif" height="31">
							<table cellspacing="0" cellpadding="0" width="146" align="left"
								border="0">
								<tbody>
									<tr>
										<td width="51" background="./images/title_1_bg.gif">
											<img height="31" src="./images/title_1.gif" width="51" />
										</td>
										<td width="95" background="./images/title_1_bg.gif">
											<span class="color_b_666">快速查资料</span>
										</td>
									</tr>
								</tbody>
							</table>
						</td>
						<td width="3">
							<img height="31" src="./images/table_03.gif" width="3" />
						</td>
					</tr>
					<tr>
						<td width="3" background="./images/table_04.gif" width="3"
							align="right">
							<img height="100%" src="./images/table_04.gif" width="3" />
						</td>
						<td>
							<html:form action="/prdview.do" method="post">
			<table width="180" border="0" align="center" cellpadding="5" cellspacing="1" >
				<tr>
					<td  background='images/Jrcj_Middle_Line.gif'>
						类型
					</td>
					<td >
						<html:select property="nbrtype">
						   <html:option value="accsnbr">接入号码</html:option>
						   <html:option value="prdinstid">产品实例ID</html:option>
						</html:select>
					</td>
				</tr>
				<tr>
					<td  background='images/Jrcj_Middle_Line.gif'>
						号码
					</td>
					<td >
						<html:text property="nbr" size="10" maxlength="10" />
					</td>
				</tr>
				<tr>
					<td colspan="2" align="center">
						   <img src='images/button_true.gif' width="63" height="21" onclick="document.forms[0].submit();" />
					</td>
				</tr>
			</table>
			<html:hidden property="method" value="list" />
		</html:form>
						</td>
						<td background="./images/table_05.gif" width="3" align="left">
							<img height="100%" src="./images/table_05.gif" width="3">
						</td>
					</tr>
					<tr>
						<td height=3 valign="top">
							<img height="12px" src="./images/table_06.gif" width="3px">
						</td>
						<td height=3 valign="top">
							<img height="3px" src="./images/table_07.gif" width="100%">
						</td>
						<td height=3 valign="top">
							<img height="12px" src="./images/table_08.gif" width="3px">
						</td>
					</tr>
				</tbody>
		</table>
		
		<%List sltmainmenulist=(new CampMenuMgr()).findallsltmainmenu(request.getSession().getAttribute("User_Auth").toString());
		for (int i=0;i<sltmainmenulist.size();i++)
		{  
		  CampMenuAuth inst=(CampMenuAuth)sltmainmenulist.get(i);
		  if(inst.getMMenuId()==4)
		  {
		     List templateList = (new IdaMgr()).findAllTemplate();
		     %>
		     <table  cellspacing="0" cellpadding="0" border="0">
				<tbody>
					<tr>
						<td width="3" height="31">
							<img height="31" src="./images/table_01.gif" width="3" />
						</td>
						<td background="./images/table_02.gif" height="31">
							<table cellspacing="0" cellpadding="0" width="146" align="left"
								border="0">
								<tbody>
									<tr>
										<td width="51" background="./images/title_1_bg.gif">
											<img height="31" src="./images/title_1.gif" width="51" />
										</td>
										<td width="95" background="./images/title_1_bg.gif">
											<span class="color_b_666">我的取数</span>
										</td>
									</tr>
								</tbody>
							</table>
						</td>
						<td width="3">
							<img height="31" src="./images/table_03.gif" width="3" />
						</td>
					</tr>
					<tr>
						<td width="3" background="./images/table_04.gif" width="3"
							align="right">
							<img height="100%" src="./images/table_04.gif" width="3" />
						</td>
						<td>
							<table width='100%' border='0' cellspacing='0' cellpadding='0'>
							<% for(int j=0;j<templateList.size();j++)
							{
							    IdaTemplate inst2=(IdaTemplate)templateList.get(j);
							    if(!inst2.getTemplateTypeId().equals("20")){
							    %>
								<tr>
									<td height='30' background='images/Jrcj_Middle_Line.gif'>
										&nbsp;&nbsp;
										<img src='images/b_dot_2.gif' width='9' height='9'>
										&nbsp;&nbsp;
										<a href='ida.do?method=runIda&templateId=<%=inst2.getTemplateId()%>' target="upFrame">
										<%
										  out.print(inst2.getTemplateName());
										%>
										</a>
									</td>
								</tr>
								<%}}%>
							</table>
						</td>
						<td background="./images/table_05.gif" width="3" align="left">
							<img height="100%" src="./images/table_05.gif" width="3">
						</td>
					</tr>
					<tr>
						<td height=3 valign="top">
							<img height="12px" src="./images/table_06.gif" width="3px">
						</td>
						<td height=3 valign="top">
							<img height="3px" src="./images/table_07.gif" width="100%">
						</td>
						<td height=3 valign="top">
							<img height="12px" src="./images/table_08.gif" width="3px">
						</td>
					</tr>
				</tbody>
		     </table>
		     <% 
		  }
		}%>
	</td>
	<td valign="top">
	<% 
	     for (int i=0;i<sltmainmenulist.size();i++)
		{  
		  CampMenuAuth inst=(CampMenuAuth)sltmainmenulist.get(i);
		  if(inst.getMMenuId()==6)
		  { %>
	    <table width="100%" border=1 class="tablestyle1" cellspacing='0' cellpadding='0' bordercolordark='#ccffff' bordercolorlight='#9999cc'>
	    <tr><td>营销波次</td><td>最后统计日期</td><td>累计呼出数</td><td>累计接触数</td><td>累计办理数</td><td>累计竣工数</td></tr>
	    <% 
	    String db = (new Constant()).getPara("DATABASE");
	    String sql="select b.camp_seq_name,a.audit_date,a.Sum_Call_Total,a.Sum_Inter_Total,a.Sum_Accp_Total,a.Sum_Fin_Total from " + Constant.getStPara("DATABASE") + ".CAMP_KPI_AUDIT_SUM a "
			+" left join " + Constant.getStPara("DATABASE") + ".CAMP_CAMP_SEQ b "
			+" on a.camp_seq_id=b.camp_seq_id "
			+" qualify row_number() over(partition by a.camp_seq_id order by a.audit_date desc)=1 "
			+" order by 2 desc";
	    List list = new ArrayList();
		try {
					DaoImpStd dao = new DaoImpStd();
					ResultSet rs = dao.select(sql);
					int idx = 0;
					while (rs.next()) {
						if(++idx > 5) break;
					   out.print("<tr><td>"+rs.getString(1)+"</td><td>"+rs.getString(2)+"</td><td>"+rs.getString(3)
					       +"</td><td>"+rs.getString(4)+"</td><td>"+rs.getString(5)+"</td><td>"+rs.getString(6)+"</td></tr>");
						
					}

				} catch (Exception e) {
					// TODO Auto-generated catch block
					e.printStackTrace();
				}
	   
	    %>
	    
	    
	    </table>
	    <%}} %>
		<DIV align="center" style="width: 600px; height: 450px">
			<table>
				<tr>
					<td colspan=3 align=center>
						<p>
							欢迎您使用TCMS营销活动管理系统，V1.0正式完整版本包含以下功能:
						</p>
					</td>
				</tr>
				<tr>
					<td>
						<img src="images/glass.jpg" border="0">
					</td>
					<td width="50" rowspan=4></td>
					<td>
						<img src="images/1.gif" border="0">
						&nbsp&nbsp【CS-客户细分】
                           客户细分为数据分析人员提供了一个提取目标客户群名单的途径，
                           通过选择目标客户群的属性特征，由系统自动生成相应的查询语句并执行，最终获取客户群的详细名单。
                        <br/>&nbsp&nbsp【SCV-单一视图】
                            包含用户和客户两级单一视图，全方位展示客户的资料、价值、行为等信息。
                            每一类所展现的具体业务原子可在系统管理界面具体配置，从而达到灵活、个性化的目的。
                            对于客户级用户，均配置了行为和价值、业务变动的信息。
 					</td>
				</tr>
				<tr>
					<td>
						<img src="images/coffee.jpg" border="0">
					</td>
					<td>
						<img src="images/2.gif" border="0">
						&nbsp&nbsp【IDA-取数平台】
                           将一些选择好的原子保存成模板，下次取数时直接取出模板并做少许的选择就可以完成取数功能。
					</td>
				</tr>
				<tr>
					<td>
						<img src="images/bike.jpg" border="0">
					</td>
					<td>
						<img src="images/3.gif" border="0">
						&nbsp&nbsp【CMM-营销管理】
	                       营销管理对应于针对性营销的营销策划阶段。主要对营销活动和营销波次进行定义并做相应的操作，营销亮点也在这里配置和生成。
	                       <br /> &nbsp;&nbsp;
	                       【MIP-营销信息提供】
                            营销信息提供也即客户接触界面，是外呼人员营销活动执行的主要界面，
                            除了提供针对性的营销信息外，还提供了个性化的营销亮点，建议呼叫时间可以帮助外呼人员提升外呼接触率。
                            界面上还提供了接触结果的列表显示，外呼人员可查看当前客户的所有历史接触记录，并可随时增加新的接触记录。
                         <br />   &nbsp;&nbsp;
                            【SRM-营销监控】
                            营销监控用来对营销活动外呼的结果进行直观的统计分析，以对营销活动的策划和执行效果进行评估，
                            并针对性的加以改进。此外受理成功率等指标也可作为员工绩效考核的参考依据。
					</td>
				</tr>
				<tr>
					<td>
						<img src="images/buiding.jpg" border="0">
					</td>
					<td>
						<img src="images/4.gif" border="0">
						&nbsp&nbsp【OCL-目标客户锁定】
                            目标客户锁定功能指在目标客户确定过程中，通过调整客户确定参数值的不同组合，
                            并对这些参数组合进行预演，将预演的预测集和验证集进行比较，计算出查准率和查全率，
                            通过对查准率和查全率的排序比较，从而选择出最有效的目标客户锁定参数组合。
						
						
					</td>
				</tr>
				<tr>
					<td colspan=3 align=center>
						<p>
							&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp有了如此方便全面的功能赶快来试试吧！
						</p>
					</td>
				</tr>
			</table>
		</DIV>
		</td></tr>
	  </table>
	</body>
</html>